def logging(fn):
    def inner(*args,**kwargs):
        print('日志输出')
        fn(*args,**kwargs)
    return inner

@logging
def sum_num(*args,**kwargs):
    sum = 0
    for i in args:
        sum += i
    for value in kwargs.values():
        sum += value
    print(sum)

sum_num(10,20,30,a=40,b=50)